<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<div>
<table  align="center"  id="tb_papeleta">
							<thead>
							<tr >
								<th width='35'>ID.PAPELETA</th>
								<th width='40'>FEC.EMISION</th>
								<th width='40'>FEC.TRABAJADA</th>							
								<th width='40' >HORA INICIO</th>
								<th width='40' >HORA FIN</th>
								<th width='40'>FEC.COMPEN.</th>							
								<th width='40' >HORA INICIO</th>
								<th width='40' >HORA FIN</th>								
								<th width='40' >OPERACION</th>	
							</tr>
							</thead>
							<tbody>
							
							<c:forEach items="${lista_papeletas}" var="papeleta" >
					            <tr>
					                <td>${papeleta.cod_papeleta}</td>
					                <td>${papeleta.fecha_emision}</td>
					                <td>${papeleta.fecha_trabajada}</td>
					                <td>${papeleta.h_trab_inicio}</td>
					                <td>${papeleta.h_trab_fin}</td>
					                <td>${papeleta.fecha_compensacion}</td>
					                <td>${papeleta.hora_inicio_compensacion}</td>
					                <td>${papeleta.hora_fin_compensacion}</td>					                
					                <td>
					                	<a onclick="anularPapeleta('${papeleta.cod_papeleta}')"><img src="<c:url value="/images/delete.png" />" style="cursor: pointer" title="Elminar Papeleta" /></a>
					                </td>
					            </tr>
					            
					        </c:forEach>
					        </tbody>
</table>
<div id="pager_papeleta"></div>
</div>
<script>
  $(document).ready(function() {
	  tableToGrid("#tb_papeleta",{height:350,
			rownumbers: true,autoWidth: true,autoHeight: true,scrollOffset: 0,rowNum: 10,
		    pager: '#pager_papeleta',viewrecords: true,
		    emptyrecords: "No hay registros",gridComplete: function () {
				$("#tb_papeleta").jqGrid('setGridParam',{rowTotal:jQuery('#tb_papeleta').jqGrid('getGridParam','records')}).trigger("reloadGrid");
			},
		    rowList: [10,20,30]});
	  $("#tb_papeleta").jqGrid('navGrid', '#pager_papeleta', {
			edit : false,
			add : false,
			del : false
		});	
	});
  </script>        
        